home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Milan_1991 / Devcon91.2 / Locale / Development / example / texttable.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-01  |  570 b   |  33 lines

  1. #define STRINGARRAY
  2.  
  3.  
  4. #include <exec/types.h>
  5. #include <libraries/locale.h>
  6. #include <clib/locale_protos.h>
  7. #include <pragmas/locale_pragmas.h>
  8. #include "texttable.h"
  9.  
  10.  
  11. #define LocaleBase li->li_LocaleBase
  12. #define catalog    (struct Catalog *)li->li_Catalog
  13.  
  14.  
  15. STRPTR GetString(struct LocaleInfo *li,LONG id)
  16. {
  17. UWORD  i;
  18. STRPTR local = NULL;
  19.  
  20.     i = 0;
  21.     while (!local)
  22.     {
  23.         if (AppStrings[i].as_ID == id)
  24.             local = AppStrings[i].as_Str;
  25.         i++;
  26.     }
  27.  
  28.     if (LocaleBase)
  29.         return(GetCatalogStr(catalog,id,local));
  30.  
  31.     return(local);
  32. }
  33.